package com.example.enums;

/**
 * @author ：chengyoubang
 * @version ：V1.0
 * @program ：first-service
 * @date ：Created in 2023/12/23 19:31
 * @description ：
 */
public enum RestDayEnum {
    SHUANG_XIU("双休",1,21.75),
    DAN_XIU("单休",2,25.75),
    DA_XIAO_ZHOU("大小周",3,23.75),
    ZUO_YI_XIU_YI("做一休一",4,15.0),
    ZUO_ER_XIU_YI("做二休一",5,20.0),
    WU_XIU("无休",6,30.0);
    private String name;
    private Integer type;
    private Double trueDay;

    RestDayEnum(String name, Integer type, Double trueDay) {
        this.name = name;
        this.type = type;
        this.trueDay = trueDay;
    }

    public static Double getTrueDay(Integer type){
        for(RestDayEnum rest:RestDayEnum.values()){
            if(rest.type.equals(type))
                return rest.trueDay;
        }
        return null;
    }
}

